package cn.xuan.zp.service.article.impl;

import cn.xuan.zp.db.domain.Article;
import cn.xuan.zp.db.mapper.ArticleMapper;
import cn.xuan.zp.service.article.IArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ArticleServiceImpl implements IArticleService {
    @Autowired
    private ArticleMapper articleMapper;
    /***
     * 新增实体
     * @param enity
     * @return
     * @throws Exception
     */
    @Override
    public int addEnity(Article enity) throws Exception {
        return articleMapper.insertSelective(enity);
    }

    /***
     * 更新实体
     * @param enity
     * @return
     * @throws Exception
     */
    @Override
    public int updateEnity(Article enity) throws Exception {
        return 0;
    }

    /***
     * 通过主键查询
     * @param id
     * @return
     */
    @Override
    public Article getByPrimaryKey(long id) throws Exception {
        return null;
    }

    /***
     * 获取所有实体
     * @return
     * @throws Exception
     */
    @Override
    public Object queryAll() throws Exception {
        return null;
    }

    /***
     * 根据条件查询实体
     * @param params
     * @return
     * @throws Exception
     */
    @Override
    public Object queryEnity(Object... params) throws Exception {
        return null;
    }
}
